<?php
class TransactionBuyUnlockColumnAction extends SzAbstractAction
{
    protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT
    );

    /**
     * 商铺栏位购买
     *
     * @param int $userId
     * @param int $reqTime
     * @param int $unlockNumber
     * @return SzResponse
     */
    public function execute($userId, $reqTime, $unlockNumber)
    {
        if (!GameService::get()->verifySysUnlock($userId, GameConst::FUNC_TRANSACTION_FUNC)) {
            return $this->buildResponse(false);
        }

        GameService::get()->validateMultiRequestTimeDelta($userId, $reqTime);

        return $this->buildResponse(
            TransactionService::get()->payForUnlock($userId)
        );
    }

}